package face.pay.web.cpn.CpnStatistics;

import face.pay.cpn.cpnStatistics.ICpnStatisticsService;
import face.pay.entity.UserInfo;
import face.pay.security.annotation.CurrentUser;
import face.pay.util.ResultMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Auther: cjj
 * @Date: 2020/2/12
 * @Description:
 */
@Controller
@RequestMapping("cpnStatistics")
public class CpnStatisticsController {

    @Autowired
    private ICpnStatisticsService iCpnStatisticsService;

    @RequestMapping("list")
    public String indxe() {
        return "cpn/cpnStatistics";
    }


    /**
     * 获取cpn
     * 统计数量
     *
     * @param loginUser
     * @param queryTime
     * @return
     */
    @RequestMapping("getStatistics")
    @ResponseBody
    public ResultMessage getStatistics(@CurrentUser UserInfo loginUser, String queryTime) {
        return this.iCpnStatisticsService.getStatistics(loginUser, queryTime);
    }
}
